Perl TCP
2023-10-19 by: Unkmar
From: Unkmar ------------------------------------------------------ I want to ask for help. Because that is the working smarter not harder. I don't want to ask for help. Because I don't want to be a bother to someone that doesn't just inherently know how to do it with almost no effort. I mean, I can figure it out without help. It will just likely take me a few hours (6+), while someone that "knows" can likely whip a sample up in 30 minutes to an 1 hour. The task is a Perl TCP listener (server), that can dynamically respond to the input. Overly simple example. If it gets "1" it can respond with "2". If it gets "2" it responds with "5". The data transfer in or out will be less than 1Kb, less than 1024 bytes. I need it to capable of async or non-blocking. So that a connection remaining open doesn't prevent second connection from succeeding. I also prefer all the code to be in a single file, and that is only because I believe it should be less than 200 lines. Probably around 100 lines or less. Meanwhile, I will go back to other things for now. And later begin burning a few hours trying to cobble something together. -- Lucius L. Hilley III=============================================================== From: Unkmar ------------------------------------------------------ Never mind, I got it. I got everything I was hoping for except the async portion, but I can live without it. Just as I stated. It took me more than 8 hours. It comes in at 142 lines. 89 Lines of code. 25 Lines are comments. 28 are blank lines. As any reasonable programmer knows, the comments and blank lines are for readability. -- Lucius L. Hilley III